#include "../views.hpp"


using lms::views::MaintenancesView;

MaintenancesView::MaintenancesView()
{
                   
 book = new BookView();
 user = new UserView();
 customer = new CustomerView();
 option = 0;
 
                   
}

void MaintenancesView::show(){
    
    do{
    Utilities::clearScreen();
    Utilities::printText("\t\t\tManagements\n");
    Utilities::printText("\t1. Users\n");
    Utilities::printText("\t2. Books\n");
    Utilities::printText("\t3. Customers\n");
    Utilities::printText("\t4. Exit\n");
    option = Utilities::reinterpret_input<int>("\tChoose An Option: ");
    
switch(option)
{
  case 1:
      user->show();
      break;
      
  case 2:
      book->show();
      break; 
                
  case 3: 
     customer->show();
     break;   
        
    case 4:
        break;
    default:
        Utilities::printText("\tInvalid Option\n");
        Utilities::pause();
        break;
    }
  }while(option != 4);
}
